home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
BBS-Archive
/
Comm
/
AmiTCP30b2.lha
/
src
/
appl
/
napsaterm
/
misc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-14
|
1KB
|
49 lines
RCS_ID_C "$Id: misc.c,v 3.1 1994/01/07 22:51:24 ppessi Exp $";
/* misc.c -- collection of generic useful functions used by niftyterm
*
* Copyright 1988, 1989 Chris Newman
* All Rights Reserved
* Permission is granted ot copy, modify, and use this as long
* as this notice remains intact. This is a nifty program.
*
* $Author: ppessi $ $Revision: 3.1 $ $Date: 1994/01/07 22:51:24 $
*/
#include <stdio.h>
#include <ctype.h>
#include "nifty.h"
#include "amiga.h"
extern struct timerequest *tr;
/* a string compare which ignores case
*/
int lstrncmp(register char *str1, register char *str2, register int len)
{
return Strnicmp(str1, str2, len);
}
/* This sleeps for a given amount of microseconds
*/
void udelay(unsigned long val)
{
Delay(val / (1000000 / 50));
}
/* simple procedure to convert decimal number of
* less than 16 digits to a string.
*/
char *itos(register long n)
{
static char sbuf[16];
register char *cp = sbuf + sizeof(sbuf) - 1;
*cp = '\0';
do {
cp--;
*cp = "0123456789"[n % 10];
n /= 10;
} while (n != 0);
return (cp);
}